package com.yunxi.baseDataToHub.pojo.urm;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

public class CheckUserTypeValidator implements ConstraintValidator<CheckUserType, Integer> {
    @Override
    public void initialize(CheckUserType constraintAnnotation) {
    }

    @Override
    public boolean isValid(Integer value, ConstraintValidatorContext context) {
        switch (value) {
            case 1:
                return true;
            case 2:
                return true;
            case 6:
                return true;
            default:
                return false;
        }
    }
}